# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=py3-jaraco.context
pkgver=4.1.1
pkgrel=1
pkgdesc="Context managers by jaraco"
url="https://github.com/jaraco/jaraco.context"
arch="noarch"
license="MIT"
depends="python3"
# py3-setuptools_scm is required to set version of python module
makedepends="
	py3-setuptools
	py3-setuptools_scm
	"
checkdepends="py3-pytest"
source="https://pypi.python.org/packages/source/j/jaraco.context/jaraco.context-$pkgver.tar.gz"
builddir="$srcdir/jaraco.context-$pkgver"

# backwards compatibility for old name
replaces="py3-jaraco-context"
provides="py3-jaraco-context=$pkgver-r$pkgrel"

build() {
	python3 setup.py build
}

check() {
	pytest
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
e01d3bd7b4eb712d00aba3fc40a78a5484141fcacf5bc772287a35ac81eca4c9744963679daadf6a170cf2ec26234243e602c89f71833fe84175ac39fb401453  jaraco.context-4.1.1.tar.gz
"
